Programming Rules
- Main text editor Notepad Plus Plus
- Costume language in Notepad Plus Plus allowing for costume text collapse
- Default text collapse open and close in notepad plus plus is ./. and /./
- Comment description above everything as if I will not remember anything of the snippet the next time I look at it
- Write ./. and /./ with each parts of snippet for it to collapse if part is over 3 lines. Exception and very short snippets. Not an iron rule apply by judgement which parts to collapse and how
- In the case of languages such as c sharp and c a work document is kept at fixed location to test codes. Default editor is Visual Studio
- C sharp default editor is Visual Studio
- Default saving of snippets is txt. Then copy pasting them into run files. Exception is jsks
- New programming snippets are temporarily placed on desktop in groups of the languages till sorted
- Desktop icons are kept to a minimum this help in motivating me to sort files from desktop to place as it visually unnerves me to see it in a none minimal display
- Folder on desktop containing blank files per language. Each with appropriate pre written lines at its head
- Name progressing codes and even designs by version. Starting with 1.0 then incrementing accounting for how big the change or how significant. Whether it is a build on over the old code and so a century decimal or something insignificant and so its plus 0.1. Integers increments are thus on amount of build ons and on significance of build ons. This should result in in better comprehension and retention of what it is I currently have and a vision of where it might get to by version x.
- Use auto hot key for shortcut for quickly brackets and circle brackets alt , and alt . For the cirle. Alt ; and alt for squiggly
- Even if knowing a method is temporary and I am going to move on from it there is still value in spending hours in setting up a thing. Like a write to file GUI in python knowing I will move on from python GUI because once its established you guarantee that you will take the time to transfer it to the new working method
- Always make variables to simplify math operators otherwise you will lose hours every year on putting parenthesis wrong. No exceptions. Even if super simple or it will necessarily be stretched to the loss of hours
- Daily viewing of a graph of all code snippets bars biggest to smallest. If too many languages split images
- Make a separate code file for every little code snippet and for all little code snippets to system and all codes by rating and date
- When making functions with parameters comment in the top line and list with a coma what the parameters refer to in order
- Postponing designation- develop my own text editor
- Postponing designation -reconsider relevance of replacement index for code
- Postponing designation -a Linux costume computer
- Postponing designation -develop my own programming language
- Comment above function parameters in format .. A=… b=… also done in case of GUI that writes functions to file
- Preference of programming language or framework learning is always above all by the online support available. A good measurement is the search of the frame work or such name on stack overflow.
- Better to copy paste variables than type saving me typing errors and hours of debugging a month
- In making of variables preference is to similar names such as in case of weekly daily monthly allowing for each alteration once I make a snippets for one of them even in case of 100s of occurrence by a simple search replace daily monthly
- Default variables writing is with words separate by underscore of descriptive variables
- Variables above functions are written on different lines allowing me to group them if related like min max
- Note if random plus minus is used on parameter in its description by +-
- Unwritten suffix of all programming tasks is to reasonably test the code on completion
- Software version incarnating number one as 0.1 increment per written update in a version history. No symbolical leap. Per 100. Means more when you look at it
- Postponing designation- website building GUI like Wix
- If having a long description break it down to lines. As long as I see one line after the other with nothing in between ill know they are split part of the same description
- Break down if and or conditions to variables with values of true or false and using the variable in a final if conditional of if true or false
- Comment above squiggly brackets what they close
- dispaly boxes are split into small strips each to contain a setnce up to 20 words except the last one to contain reminder allowing me to read sweeping down rather than each time going left to right
- before a copy paste of a singline line you have to try to manually type and fail. exception when i have no doubt i know how to type it and am just saving time by copy pasting over typing
- message boxes in polymath other than for debug purposes are by costume pormpt with image for me to develop hints. like picture of a guy in thinking pose on message consdier...
- by default a small text search box next to new dropdowns created if you expect them to have many values.
- when using a filtering prompt you have to each time skim one column at a time looking at the image and seeing if you know what its refrencing and if you dont then you have to read its refrence title. you do this each time till you can easily tell what the image is refrencing and then you can just look at the images one column at a time without reading their refrences
- preferance when looping through mysql table rows to use where filter and limit to only loop through relevant rows and save time
- on a function arriving at sufficinet complexity make a second grid of sub switches for its sub functions allowing to easily turn them on and off. this is done using a text box getting the function name on its cell selection within the first grid and a button to load its subfunctions switches within the second grid
- use SQLBackupAndFTP for hourly automatic mysql databases backup
- weekly functions running at day start load only if day of the week is sunday
- log start time and end time of all functions into a mysql table to get better awareness of their durations. written as a two liner. first line contains a variable of the title of the function for quick alteration and the second is the update itself. needs to be applied for new code written. i dont have to apply for code already written unless i make some edit to it
- sqlite for portable databases in .net applications
- in goals rating the rating of the mother goals is the greatest. above that of the close subgoals. yet still tasks and rules aimed at subgoals get greater priority because the time estimation of sub goals is smaller and so parameters reward them for greater progress contribution. the reason they get higher rating is in case difference in time estimation of them and thier subgoals is small enough so that ill go after the main thing rather than a subgoal
- portable apps are developed in a seperate visual studio project rather than as part of the main one
- before code task is considered finished i have to take the entire code and paste it into a text box in a debugging form to establish a habit that would later allow me to apply coding standards
- on entering deubgger window a prompt that asks for programming langauge. based on selection a button that checks for typos going through every word in text box and a list of function words of that language checking for 1 levenshtein distance errors and changing font of these to red and creating popup of total errors
- debugger window also serves as a code editor window being able to shut down deubgger fuctions automatically applied to text box by an on off button
- a special timer meant for manual text edits. if manual text edit exceeds 15 minutes i have to write a function for it that will always be accessible in text editor. place this timer on side bar instead of the 60 minutes timer
- to make me develop code editor and debugger visual studio forms backups are stored in edtor form rathe thatr in notepad plus plus as i anyway dont use it anymore for edits
- gui buttons in the same sections have to be of the same size. applies for new forms and when adding buttons to existing forms
- designated compact code - get visual studio dropdown value in a single line
- sqlite connection strings are named including the name of the data base they are connecting to
- in new forms that only have sqlite connections if needing to create a new table create a new sqlite database and the desired table rather than using mysql existing database and messing up the form making it part mysql part sqlite
- sqlite limitation of locking database not allowing to read and write at the same time is overcome using a load box in each form and changing its text to loaded or not loaded at the appropriate locations
- in sqlite to reduce need to use load box dont alter controllers within read functions. only after the connection is closed to not trigger controller change function that will try to access the same database. instead get values from read assign to variables and only once the connection is closed make the controller text or such alteration
- in the case of running a code for the first time and getting an error first thing to do is read it from the top looking for typos. on finding the first typo fix it and run the code again as the first one is likely to be the only one. if keeping on getting errors repeat till entire code is read and only then start debugging conducts to locate the cause of the error
- side bar form always having a timer running and an hourly interval that backup all sqlite databases copying them to an incrementing folder
- polymath home load resets a cointainer marking whether a new debug file has been created. if it hasent a general function of write to debug file counts amount of files in folder and creates a new increment. side bar displaying the greatest increment with a load button which creates a new file on right mouse click
- on debug attempt number 10 if there is a wait time within code such as having to wait for loop to arrive at a certain point try to minimize this wait time like replicating the faulty conditions within the first loop
- only on really rare occasions can a routh patch be used to fix a coding bug. meaning not knowing why the bug happens. not fixing the direct cause yet using an if condition in case it happens to tell the code to keep going. only if too much time is spent debugging without success or if predicting rewriting the code in the future or predicting managing to debug the code in the future for some reason not available in the present
- in complicated codes when having trouble locating which part is being skipped due to if statement or such spread incrementing markers writing to debug file along code
- default button to create in the creation of every new form is a test button. meant to remind me in case of a long execution and struggling with a debug to use the test button to create a costume abbreviated execution
- monthly reminder if project wont run after adding sqlite connection without error it might be error in relative path of sqlite database
- if i waste a bunch of time doing debugging and im afraid it may happen again leave a comment in the code near the area i would check if it happens again as to what the problem might be
- on giving a drop down additional functionality like when right clicking it or double clicking it give it a distinct fill like a gray fill to let me know
- it is important to create visual studio form controllers in certain order accounting for wanting to go from one to the next using tab. this order should also be reestablished if adding a new controller post creation
- add are you sure? to buttons of long loads in case of a misclick
- incrementing part of variables only as suffix to allow search replace in case i want to add variation to its name such as _picture
- try to fear that a debug that is going to take while such as converting all images to low res might have nothing to do with the problem and will be all for nothing and so make damn sure its the issue. Such as by turning images load off and seeing if bug remains
- switching variable from local to global delete declaration of the local so i dont miss refrences
- learn things when you need to know them to solve a problem not before
- when creating controllers in visual studio bunch together the controllers by differnt properties such as a paragraph of all the sizes declarations or positions to easily see them in relation to one another rather than each time defining all the properties for each controller separately
- dont asisgn values to variables when declaring them. this will occasionally result in extended debugging not noticing there is an error in value retrieval
- controllers creation in visual studio is done using a function per each passing paramters of their properties rather than each time writing 10 lines to create a button
- by lesson of adding system insertion when adding task always think while writing code what a pain its going to be if i need to make an edit later on and write in accordance
- on using a loop to create and lunch a costume made pormpt always place the show at the end of the loop so first prompt doesnt show before some function gets decalred
- the reason code isnt to be developed in excel is because once it reaches a certain level of complexity it stops working and there is no fixing it
- dont start any title with a number. it leads to errors in unforseen programming uses
- in mysql updates and insertion in case of failure alert data not inserted + query string
- when doing mysql functions always write query to a debug file to be able to review if debugging is required
- if using a prompt on mysql function to notify me data has been inserted also metion the name of the database and table where it was inserted to
- when using visual studio and removing a loop first find itsclosing bracket delete that and only then scroll up and delete the loop line to prevenet fumlbing looking for the closing bracket to delete afterwards
- when using visual studio and removing a loop first find itsclosing bracket delete that and only then scroll up and delete the loop line to prevenet fumlbing looking for the closing bracket to delete afterwards
- load grid in c sharp visual studio using a general function that gets the datatable in a single line of code
- prevent visual studio controllers flashing by hiding or decreasing size of form to 0 till loaded
- before manual task i feel will take 10 minutes or longer consider whether making a code to do it will take less time than the task itself also leaving me with the code to do it swiftly next time. if so make the code. also make the code even if it will take longer than the task if i think the code will be highly useful giving me a return of value on the time
- on correcting a line of code that i remember i used in more than one place in project do search for entire solution and correct them all
- when writing down a marker to file attempting to locate a bug also have it write a randomly typed number for me to later easily locate the marker and disable it looking for that number in entire project
- create temp folder for output and temporarily change path to that temp folder over excusing not testing code to not make a mess in the real folder
- when choosing to write out specific code over using a loop. use one base for specific such as position and size of a primary control and specifiy all others in relation to it so i can alter all of them by a single code edit of the specifics of the base
- on creating a control as a gird by loop use the count of the list of the control to refrence position
- creating code always look ahead to exceeding capacities such as total controllers creating errors even if seemingly 100 years in the future to avoid getting there early and having to debug looking for the issue
- before using google to look up answers for coding questions try chatgbt
- to minimize code operations in visual studio rather than running code on every timer tick event run it every several seconds checking if seconds remainder when divided by 2 or 3 or such is zero
- in mysql and sqlite avoid using column names containing programming language words such as limit. instead try to use synonyms or even translation of the word you want to another language. to use these words in column may bring unforeseen debugging in the future
- if adding a paramter to an existing visual studio c sharp function always add it in the end. to add it in the middle or where it makes sense may bring to hours of debugging as i go over all the existing uses of the function inserting a value. alternatively create a new function called the same only with an incremented suffix indicating a more advanced version